home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 2.iso / dist / fw_grep.idb / usr / freeware / catman / u_man / cat1 / grep.Z / grep
Text File  |  2000-04-13  |  28KB  |  529 lines

  1.  
  2.  
  3.  
  4.      GGGGRRRREEEEPPPP((((1111))))         GGGGNNNNUUUU PPPPrrrroooojjjjeeeecccctttt ((((2222000000000000////00002222////22226666))))           GGGGRRRREEEEPPPP((((1111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       grep,    egrep, fgrep - print lines matching a pattern
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.       ggggrrrreeeepppp [_o_p_t_i_o_n_s] _P_A_T_T_E_R_N [_F_I_L_E...]
  13.       ggggrrrreeeepppp [_o_p_t_i_o_n_s] [----eeee _P_A_T_T_E_R_N | ----ffff _F_I_L_E]    [_F_I_L_E...]
  14.  
  15.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.       GGGGrrrreeeepppp searches    the named input    _F_I_L_Es (or standard input if no
  17.       files    are named, or the file name ---- is given)    for lines
  18.       containing a match to    the given _P_A_T_T_E_R_N.  By default,    ggggrrrreeeepppp
  19.       prints the matching lines.
  20.  
  21.       In addition, two variant programs eeeeggggrrrreeeepppp and ffffggggrrrreeeepppp are
  22.       available.  EEEEggggrrrreeeepppp is the same    as ggggrrrreeeepppp    ----EEEE.  FFFFggggrrrreeeepppp is the same
  23.       as ggggrrrreeeepppp ----FFFF.
  24.  
  25.      OOOOPPPPTTTTIIIIOOOONNNNSSSS
  26.       ----AAAA _N_U_M, --------aaaafffftttteeeerrrr----ccccoooonnnntttteeeexxxxtttt====_N_U_M
  27.            Print _N_U_M lines of trailing context after matching
  28.            lines.
  29.  
  30.       ----aaaa, --------tttteeeexxxxtttt
  31.            Process a binary    file as    if it were text; this is
  32.            equivalent to the --------bbbbiiiinnnnaaaarrrryyyy----ffffiiiilllleeeessss====tttteeeexxxxtttt option.
  33.  
  34.       ----BBBB _N_U_M, --------bbbbeeeeffffoooorrrreeee----ccccoooonnnntttteeeexxxxtttt====_N_U_M
  35.            Print _N_U_M lines of leading context before matching
  36.            lines.
  37.  
  38.       ----CCCC [_N_U_M], ----_N_U_M, --------ccccoooonnnntttteeeexxxxtttt[====_N_U_M]
  39.            Print _N_U_M lines (default    2) of output context.
  40.  
  41.       ----bbbb, --------bbbbyyyytttteeee----ooooffffffffsssseeeetttt
  42.            Print the byte offset within the    input file before each
  43.            line of output.
  44.  
  45.       --------bbbbiiiinnnnaaaarrrryyyy----ffffiiiilllleeeessss====_T_Y_P_E
  46.            If the first few    bytes of a file    indicate that the file
  47.            contains    binary data, assume that the file is of    type
  48.            _T_Y_P_E.  By default, _T_Y_P_E is bbbbiiiinnnnaaaarrrryyyy, and ggggrrrreeeepppp normally
  49.            outputs either a    one-line message saying    that a binary
  50.            file matches, or    no message if there is no match.  If
  51.            _T_Y_P_E is wwwwiiiitttthhhhoooouuuutttt----mmmmaaaattttcccchhhh, ggggrrrreeeepppp assumes that    a binary file
  52.            does not    match; this is equivalent to the ----IIII option.
  53.            If _T_Y_P_E is tttteeeexxxxtttt,    ggggrrrreeeepppp processes a binary    file as    if it
  54.            were text; this is equivalent to    the ----aaaa option.
  55.            _W_a_r_n_i_n_g:    ggggrrrreeeepppp --------bbbbiiiinnnnaaaarrrryyyy----ffffiiiilllleeeessss====tttteeeexxxxtttt might output binary
  56.            garbage,    which can have nasty side effects if the
  57.            output is a terminal and    if the terminal    driver
  58.            interprets some of it as    commands.
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                          (printed 4/5/00)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      GGGGRRRREEEEPPPP((((1111))))         GGGGNNNNUUUU PPPPrrrroooojjjjeeeecccctttt ((((2222000000000000////00002222////22226666))))           GGGGRRRREEEEPPPP((((1111))))
  71.  
  72.  
  73.  
  74.       ----cccc, --------ccccoooouuuunnnntttt
  75.            Suppress    normal output; instead print a count of
  76.            matching    lines for each input file.  With the ----vvvv,
  77.            --------iiiinnnnvvvveeeerrrrtttt----mmmmaaaattttcccchhhh option (see below), count    non-matching
  78.            lines.
  79.  
  80.       ----dddd _A_C_T_I_O_N, --------ddddiiiirrrreeeeccccttttoooorrrriiiieeeessss====_A_C_T_I_O_N
  81.            If an input file    is a directory,    use _A_C_T_I_O_N to process
  82.            it.  By default,    _A_C_T_I_O_N is rrrreeeeaaaadddd,    which means that
  83.            directories are read just as if they were ordinary
  84.            files.  If _A_C_T_I_O_N is sssskkkkiiiipppp, directories are silently
  85.            skipped.     If _A_C_T_I_O_N is rrrreeeeccccuuuurrrrsssseeee, ggggrrrreeeepppp reads all files
  86.            under each directory, recursively; this is equivalent
  87.            to the ----rrrr option.
  88.  
  89.       ----EEEE, --------eeeexxxxtttteeeennnnddddeeeedddd----rrrreeeeggggeeeexxxxpppp
  90.            Interpret _P_A_T_T_E_R_N as an extended    regular    expression
  91.            (see below).
  92.  
  93.       ----eeee _P_A_T_T_E_R_N, --------rrrreeeeggggeeeexxxxpppp====_P_A_T_T_E_R_N
  94.            Use _P_A_T_T_E_R_N as the pattern; useful to protect patterns
  95.            beginning with ----.
  96.  
  97.       ----FFFF, --------ffffiiiixxxxeeeedddd----ssssttttrrrriiiinnnnggggssss
  98.            Interpret _P_A_T_T_E_R_N as a list of fixed strings, separated
  99.            by newlines, any    of which is to be matched.
  100.  
  101.       ----ffff _F_I_L_E, --------ffffiiiilllleeee====_F_I_L_E
  102.            Obtain patterns from _F_I_L_E, one per line.     The empty
  103.            file contains zero patterns, and    therefore matches
  104.            nothing.
  105.  
  106.       ----GGGG, --------bbbbaaaassssiiiicccc----rrrreeeeggggeeeexxxxpppp
  107.            Interpret _P_A_T_T_E_R_N as a basic regular expression (see
  108.            below).    This is    the default.
  109.  
  110.       ----HHHH, --------wwwwiiiitttthhhh----ffffiiiilllleeeennnnaaaammmmeeee
  111.            Print the filename for each match.
  112.  
  113.       ----hhhh, --------nnnnoooo----ffffiiiilllleeeennnnaaaammmmeeee
  114.            Suppress    the prefixing of filenames on output when
  115.            multiple    files are searched.
  116.  
  117.       --------hhhheeeellllpppp
  118.            Output a    brief help message.
  119.  
  120.       ----IIII   Process a binary    file as    if it did not contain matching
  121.            data; this is equivalent    to the --------bbbbiiiinnnnaaaarrrryyyy----
  122.            ffffiiiilllleeeessss====wwwwiiiitttthhhhoooouuuutttt----mmmmaaaattttcccchhhh option.
  123.  
  124.       ----iiii, --------iiiiggggnnnnoooorrrreeee----ccccaaaasssseeee
  125.            Ignore case distinctions    in both    the _P_A_T_T_E_R_N and    the
  126.  
  127.  
  128.  
  129.      Page 2                          (printed 4/5/00)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      GGGGRRRREEEEPPPP((((1111))))         GGGGNNNNUUUU PPPPrrrroooojjjjeeeecccctttt ((((2222000000000000////00002222////22226666))))           GGGGRRRREEEEPPPP((((1111))))
  137.  
  138.  
  139.  
  140.            input files.
  141.  
  142.       ----LLLL, --------ffffiiiilllleeeessss----wwwwiiiitttthhhhoooouuuutttt----mmmmaaaattttcccchhhh
  143.            Suppress    normal output; instead print the name of each
  144.            input file from which no    output would normally have
  145.            been printed.  The scanning will    stop on    the first
  146.            match.
  147.  
  148.       ----llll, --------ffffiiiilllleeeessss----wwwwiiiitttthhhh----mmmmaaaattttcccchhhheeeessss
  149.            Suppress    normal output; instead print the name of each
  150.            input file from which output would normally have    been
  151.            printed.     The scanning will stop    on the first match.
  152.  
  153.       --------mmmmmmmmaaaapppp
  154.            If possible, use    the mmmmmmmmaaaapppp(2) system call    to read    input,
  155.            instead of the default rrrreeeeaaaadddd(2) system call.  In some
  156.            situations, --------mmmmmmmmaaaapppp yields better    performance.  However,
  157.            --------mmmmmmmmaaaapppp can cause    undefined behavior (including core
  158.            dumps) if an input file shrinks while ggggrrrreeeepppp is
  159.            operating, or if    an I/O error occurs.
  160.  
  161.       ----nnnn, --------lllliiiinnnneeee----nnnnuuuummmmbbbbeeeerrrr
  162.            Prefix each line    of output with the line    number within
  163.            its input file.
  164.  
  165.       ----qqqq, --------qqqquuuuiiiieeeetttt, --------ssssiiiilllleeeennnntttt
  166.            Quiet; suppress normal output.  The scanning will stop
  167.            on the first match.  Also see the ----ssss or --------nnnnoooo----mmmmeeeessssssssaaaaggggeeeessss
  168.            option below.
  169.  
  170.       ----rrrr, --------rrrreeeeccccuuuurrrrssssiiiivvvveeee
  171.            Read all    files under each directory, recursively; this
  172.            is equivalent to    the ----dddd rrrreeeeccccuuuurrrrsssseeee option.
  173.  
  174.       ----ssss, --------nnnnoooo----mmmmeeeessssssssaaaaggggeeeessss
  175.            Suppress    error messages about nonexistent or unreadable
  176.            files.  Portability note: unlike    GNU ggggrrrreeeepppp, traditional
  177.            ggggrrrreeeepppp did    not conform to POSIX.2,    because    traditional
  178.            ggggrrrreeeepppp lacked a ----qqqq    option and its ----ssss option behaved like
  179.            GNU ggggrrrreeeepppp's ----qqqq option.  Shell scripts intended to    be
  180.            portable    to traditional ggggrrrreeeepppp should avoid both ----qqqq and
  181.            ----ssss and should redirect output to    /dev/null instead.
  182.  
  183.       ----UUUU, --------bbbbiiiinnnnaaaarrrryyyy
  184.            Treat the file(s) as binary.  By    default, under MS-DOS
  185.            and MS-Windows, ggggrrrreeeepppp guesses the    file type by looking
  186.            at the contents of the first 32KB read from the file.
  187.            If ggggrrrreeeepppp decides the file    is a text file,    it strips the
  188.            CR characters from the original file contents (to make
  189.            regular expressions with    ^^^^ and $$$$    work correctly).
  190.            Specifying ----UUUU overrules this guesswork, causing all
  191.            files to    be read    and passed to the matching mechanism
  192.  
  193.  
  194.  
  195.      Page 3                          (printed 4/5/00)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      GGGGRRRREEEEPPPP((((1111))))         GGGGNNNNUUUU PPPPrrrroooojjjjeeeecccctttt ((((2222000000000000////00002222////22226666))))           GGGGRRRREEEEPPPP((((1111))))
  203.  
  204.  
  205.  
  206.            verbatim; if the    file is    a text file with CR/LF pairs
  207.            at the end of each line,    this will cause    some regular
  208.            expressions to fail.  This option has no    effect on
  209.            platforms other than MS-DOS and MS-Windows.
  210.  
  211.       ----uuuu, --------uuuunnnniiiixxxx----bbbbyyyytttteeee----ooooffffffffsssseeeettttssss
  212.            Report Unix-style byte offsets.    This switch causes
  213.            ggggrrrreeeepppp to report byte offsets as if the file were Unix-
  214.            style text file,    i.e. with CR characters    stripped off.
  215.            This will produce results identical to running ggggrrrreeeepppp on
  216.            a Unix machine.    This option has    no effect unless ----bbbb
  217.            option is also used; it has no effect on    platforms
  218.            other than MS-DOS and MS-Windows.
  219.  
  220.       ----VVVV, --------vvvveeeerrrrssssiiiioooonnnn
  221.            Print the version number    of ggggrrrreeeepppp    to standard error.
  222.            This version number should be included in all bug
  223.            reports (see below).
  224.  
  225.       ----vvvv, --------iiiinnnnvvvveeeerrrrtttt----mmmmaaaattttcccchhhh
  226.            Invert the sense    of matching, to    select non-matching
  227.            lines.
  228.  
  229.       ----wwww, --------wwwwoooorrrrdddd----rrrreeeeggggeeeexxxxpppp
  230.            Select only those lines containing matches that form
  231.            whole words.  The test is that the matching substring
  232.            must either be at the beginning of the line, or
  233.            preceded    by a non-word constituent character.
  234.            Similarly, it must be either at the end of the line or
  235.            followed    by a non-word constituent character.  Word-
  236.            constituent characters are letters, digits, and the
  237.            underscore.
  238.  
  239.       ----xxxx, --------lllliiiinnnneeee----rrrreeeeggggeeeexxxxpppp
  240.            Select only those matches that exactly match the    whole
  241.            line.
  242.  
  243.       ----yyyy   Obsolete    synonym    for ----iiii.
  244.  
  245.       ----ZZZZ, --------nnnnuuuullllllll
  246.            Output a    zero byte (the ASCII NNNNUUUULLLL character) instead of
  247.            the character that normally follows a file name.     For
  248.            example,    ggggrrrreeeepppp ----llllZZZZ outputs a zero    byte after each    file
  249.            name instead of the usual newline.  This    option makes
  250.            the output unambiguous, even in the presence of file
  251.            names containing    unusual    characters like    newlines.
  252.            This option can be used with commands like ffffiiiinnnndddd
  253.            ----pppprrrriiiinnnntttt0000,    ppppeeeerrrrllll ----0000, ssssoooorrrrtttt ----zzzz, and xxxxaaaarrrrggggssss ----0000 to process
  254.            arbitrary file names, even those    that contain newline
  255.            characters.
  256.  
  257.      RRRREEEEGGGGUUUULLLLAAAARRRR EEEEXXXXPPPPRRRREEEESSSSSSSSIIIIOOOONNNNSSSS
  258.  
  259.  
  260.  
  261.      PPPPaaaaggggeeee 4444                          ((((pppprrrriiiinnnntttteeeedddd 4444////5555////00000000))))
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      GGGGRRRREEEEPPPP((((1111))))         GGGGNNNNUUUU PPPPrrrroooojjjjeeeecccctttt ((((2222000000000000////00002222////22226666))))           GGGGRRRREEEEPPPP((((1111))))
  269.  
  270.  
  271.  
  272.       A regular expression is a pattern that describes a set of
  273.       strings.  Regular expressions    are constructed    analogously to
  274.       arithmetic expressions, by using various operators to
  275.       combine smaller expressions.
  276.  
  277.       GGGGrrrreeeepppp understands two different versions of regular
  278.       expression syntax:  ``basic''    and ``extended.''  In
  279.       GNU ggggrrrreeeepppp, there is no    difference in available    functionality
  280.       using    either syntax.    In other implementations, basic
  281.       regular expressions are less powerful.  The following
  282.       description applies to extended regular expressions;
  283.       differences for basic    regular    expressions are    summarized
  284.       afterwards.
  285.  
  286.       The fundamental building blocks are the regular expressions
  287.       that match a single character.  Most characters, including
  288.       all letters and digits, are regular expressions that match
  289.       themselves.  Any metacharacter with special meaning may be
  290.       quoted by preceding it with a    backslash.
  291.  
  292.       A list of characters enclosed    by [[[[ and ]]]] matches any single
  293.       character in that list; if the first character of the    list
  294.       is the caret ^^^^ then it matches any character _n_o_t in the
  295.       list.     For example, the regular expression [[[[0000111122223333444455556666777788889999]]]]
  296.       matches any single digit.  A range of    characters may be
  297.       specified by giving the first    and last characters, separated
  298.       by a hyphen.    Finally, certain named classes of characters
  299.       are predefined.  Their names are self    explanatory, and they
  300.       are [[[[::::aaaallllnnnnuuuummmm::::]]]], [[[[::::aaaallllpppphhhhaaaa::::]]]], [[[[::::ccccnnnnttttrrrrllll::::]]]], [[[[::::ddddiiiiggggiiiitttt::::]]]], [[[[::::ggggrrrraaaapppphhhh::::]]]],
  301.       [[[[::::lllloooowwwweeeerrrr::::]]]], [[[[::::pppprrrriiiinnnntttt::::]]]],    [[[[::::ppppuuuunnnncccctttt::::]]]], [[[[::::ssssppppaaaacccceeee::::]]]], [[[[::::uuuuppppppppeeeerrrr::::]]]], and
  302.       [[[[::::xxxxddddiiiiggggiiiitttt::::]]]]....  For example, [[[[[[[[::::aaaallllnnnnuuuummmm::::]]]]]]]]    means [[[[0000----9999AAAA----ZZZZaaaa----zzzz]]]],
  303.       except the latter form depends upon the POSIX    locale and the
  304.       ASCII    character encoding, whereas the    former is independent
  305.       of locale and    character set.    (Note that the brackets    in
  306.       these    class names are    part of    the symbolic names, and    must
  307.       be included in addition to the brackets delimiting the
  308.       bracket list.)  Most metacharacters lose their special
  309.       meaning inside lists.     To include a literal ]]]]    place it first
  310.       in the list.    Similarly, to include a    literal    ^^^^ place    it
  311.       anywhere but first.  Finally,    to include a literal ---- place
  312.       it last.
  313.  
  314.       The period .... matches any single character.  The symbol \\\\wwww is
  315.       a synonym for    [[[[[[[[::::aaaallllnnnnuuuummmm::::]]]]]]]] and    \\\\WWWW is a    synonym    for
  316.       [[[[^^^^[[[[::::aaaallllnnnnuuuummmm]]]]]]]].
  317.  
  318.       The caret ^^^^ and the dollar sign $$$$ are    metacharacters that
  319.       respectively match the empty string at the beginning and end
  320.       of a line.  The symbols \\\\<<<< and \\\\>>>> respectively match the
  321.       empty    string at the beginning    and end    of a word.  The    symbol
  322.       \\\\bbbb matches the empty string at the edge of a word, and \\\\BBBB
  323.       matches the empty string provided it's _n_o_t at    the edge of a
  324.  
  325.  
  326.  
  327.      Page 5                          (printed 4/5/00)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      GGGGRRRREEEEPPPP((((1111))))         GGGGNNNNUUUU PPPPrrrroooojjjjeeeecccctttt ((((2222000000000000////00002222////22226666))))           GGGGRRRREEEEPPPP((((1111))))
  335.  
  336.  
  337.  
  338.       word.
  339.  
  340.       A regular expression may be followed by one of several
  341.       repetition operators:
  342.       ????    The preceding item is optional and matched at most
  343.            once.
  344.       ****    The preceding item will be matched zero or more times.
  345.       ++++    The preceding item will be matched one or more times.
  346.       {{{{_n}}}}  The preceding item is matched exactly _n times.
  347.       {{{{_n,,,,}}}} The preceding item is matched _n or more times.
  348.       {{{{_n,,,,_m}}}}
  349.            The preceding item is matched at    least _n    times, but not
  350.            more than _m times.
  351.  
  352.       Two regular expressions may be concatenated; the resulting
  353.       regular expression matches any string    formed by
  354.       concatenating    two substrings that respectively match the
  355.       concatenated subexpressions.
  356.  
  357.       Two regular expressions may be joined    by the infix operator
  358.       ||||; the resulting regular expression matches any string
  359.       matching either subexpression.
  360.  
  361.       Repetition takes precedence over concatenation, which    in
  362.       turn takes precedence    over alternation.  A whole
  363.       subexpression    may be enclosed    in parentheses to override
  364.       these    precedence rules.
  365.  
  366.       The backreference \\\\_n,    where _n    is a single digit, matches the
  367.       substring previously matched by the _nth parenthesized
  368.       subexpression    of the regular expression.
  369.  
  370.       In basic regular expressions the metacharacters ????, ++++,    {{{{, ||||,
  371.       ((((, and )))) lose    their special meaning; instead use the
  372.       backslashed versions \\\\????, \\\\++++, \\\\{{{{, \\\\||||, \\\\((((, and \\\\)))).
  373.  
  374.       Traditional eeeeggggrrrreeeepppp did    not support the    {{{{ metacharacter, and
  375.       some eeeeggggrrrreeeepppp implementations support \\\\{{{{    instead, so portable
  376.       scripts should avoid {{{{ in eeeeggggrrrreeeepppp patterns and should use [[[[{{{{]]]]
  377.       to match a literal {{{{.
  378.  
  379.       GNU eeeeggggrrrreeeepppp attempts to    support    traditional usage by assuming
  380.       that {{{{ is not    special    if it would be the start of an invalid
  381.       interval specification.  For example,    the shell command
  382.       eeeeggggrrrreeeepppp    ''''{{{{1111'''' searches for the two-character string {{{{1111 instead
  383.       of reporting a syntax    error in the regular expression.
  384.       POSIX.2 allows this behavior as an extension,    but portable
  385.       scripts should avoid it.
  386.  
  387.      EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT VVVVAAAARRRRIIIIAAAABBBBLLLLEEEESSSS
  388.       GGGGRRRREEEEPPPP____OOOOPPPPTTTTIIIIOOOONNNNSSSS
  389.            This variable specifies default options to be placed in
  390.  
  391.  
  392.  
  393.      Page 6                          (printed 4/5/00)
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      GGGGRRRREEEEPPPP((((1111))))         GGGGNNNNUUUU PPPPrrrroooojjjjeeeecccctttt ((((2222000000000000////00002222////22226666))))           GGGGRRRREEEEPPPP((((1111))))
  401.  
  402.  
  403.  
  404.            front of    any explicit options.  For example, if
  405.            GGGGRRRREEEEPPPP____OOOOPPPPTTTTIIIIOOOONNNNSSSS is ''''--------bbbbiiiinnnnaaaarrrryyyy----ffffiiiilllleeeessss====wwwwiiiitttthhhhoooouuuutttt----mmmmaaaattttcccchhhh
  406.            --------ddddiiiirrrreeeeccccttttoooorrrriiiieeeessss====sssskkkkiiiipppp'''', ggggrrrreeeepppp behaves as if the two options
  407.            --------bbbbiiiinnnnaaaarrrryyyy----ffffiiiilllleeeessss====wwwwiiiitttthhhhoooouuuutttt----mmmmaaaattttcccchhhh and    --------ddddiiiirrrreeeeccccttttoooorrrriiiieeeessss====sssskkkkiiiipppp had
  408.            been specified before any explicit options.  Option
  409.            specifications are separated by whitespace.  A
  410.            backslash escapes the next character, so    it can be used
  411.            to specify an option containing whitespace or a
  412.            backslash.
  413.  
  414.       LLLLCCCC____AAAALLLLLLLL, LLLLCCCC____MMMMEEEESSSSSSSSAAAAGGGGEEEESSSS, LLLLAAAANNNNGGGG
  415.            These variables specify the LLLLCCCC____MMMMEEEESSSSSSSSAAAAGGGGEEEESSSS locale, which
  416.            determines the language that ggggrrrreeeepppp uses for messages.
  417.            The locale is determined    by the first of    these
  418.            variables that is set.  American    English    is used    if
  419.            none of these environment variables are set, or if the
  420.            message catalog is not installed, or if ggggrrrreeeepppp was    not
  421.            compiled    with national language support (NLS).
  422.  
  423.       LLLLCCCC____AAAALLLLLLLL, LLLLCCCC____CCCCTTTTYYYYPPPPEEEE, LLLLAAAANNNNGGGG
  424.            These variables specify the LLLLCCCC____CCCCTTTTYYYYPPPPEEEE locale, which
  425.            determines the type of characters, e.g.,    which
  426.            characters are whitespace.  The locale is determined by
  427.            the first of these variables that is set.  The POSIX
  428.            locale is used if none of these environment variables
  429.            are set,    or if the locale catalog is not    installed, or
  430.            if ggggrrrreeeepppp was not compiled    with national language support
  431.            (NLS).
  432.  
  433.       PPPPOOOOSSSSIIIIXXXXLLLLYYYY____CCCCOOOORRRRRRRREEEECCCCTTTT
  434.            If set, ggggrrrreeeepppp behaves as POSIX.2 requires; otherwise,
  435.            ggggrrrreeeepppp behaves more like other GNU    programs.  POSIX.2
  436.            requires    that options that follow file names must be
  437.            treated as file names; by default, such options are
  438.            permuted    to the front of    the operand list and are
  439.            treated as options.  Also, POSIX.2 requires that
  440.            unrecognized options be diagnosed as ``illegal'', but
  441.            since they are not really against the law the default
  442.            is to diagnose them as ``invalid''.  PPPPOOOOSSSSIIIIXXXXLLLLYYYY____CCCCOOOORRRRRRRREEEECCCCTTTT
  443.            also disables _____N____GGGGNNNNUUUU____nnnnoooonnnnooooppppttttiiiioooonnnn____aaaarrrrggggvvvv____ffffllllaaaaggggssss____, described
  444.            below.
  445.  
  446.       _____N____GGGGNNNNUUUU____nnnnoooonnnnooooppppttttiiiioooonnnn____aaaarrrrggggvvvv____ffffllllaaaaggggssss____
  447.            (Here _N is ggggrrrreeeepppp's numeric process ID.)  If the _ith
  448.            character of this environment variable's    value is 1111, do
  449.            not consider the    _ith operand of ggggrrrreeeepppp to be an option,
  450.            even if it appears to be    one.  A    shell can put this
  451.            variable    in the environment for each command it runs,
  452.            specifying which    operands are the results of file name
  453.            wildcard    expansion and therefore    should not be treated
  454.            as options.  This behavior is available only with the
  455.            GNU C library, and only when PPPPOOOOSSSSIIIIXXXXLLLLYYYY____CCCCOOOORRRRRRRREEEECCCCTTTT is not
  456.  
  457.  
  458.  
  459.      Page 7                          (printed 4/5/00)
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.      GGGGRRRREEEEPPPP((((1111))))         GGGGNNNNUUUU PPPPrrrroooojjjjeeeecccctttt ((((2222000000000000////00002222////22226666))))           GGGGRRRREEEEPPPP((((1111))))
  467.  
  468.  
  469.  
  470.            set.
  471.  
  472.      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  473.       Normally, exit status    is 0 if    matches    were found, and    1 if
  474.       no matches were found.  (The ----vvvv option inverts the sense of
  475.       the exit status.)  Exit status is 2 if there were syntax
  476.       errors in the    pattern, inaccessible input files, or other
  477.       system errors.
  478.  
  479.      BBBBUUUUGGGGSSSS
  480.       Email    bug reports to bbbbuuuugggg----ggggnnnnuuuu----uuuuttttiiiillllssss@@@@ggggnnnnuuuu....oooorrrrgggg.  Be sure to
  481.       include the word ``grep'' somewhere in the ``Subject:''
  482.       field.
  483.  
  484.       Large    repetition counts in the {{{{_m,,,,_n}}}} construct may cause
  485.       grep to use lots of memory.  In addition, certain other
  486.       obscure regular expressions require exponential time and
  487.       space, and may cause ggggrrrreeeepppp to run out of memory.
  488.  
  489.       Backreferences are very slow,    and may    require    exponential
  490.       time.
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.      Page 8                          (printed 4/5/00)
  526.  
  527.  
  528.  
  529.